<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
    <title>网格管理</title>
    <!-- Link Swiper's CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">

    <link rel="stylesheet" href="css/public.css">

    <style>

        .step {
            text-align: center;
            display: inline-block;
        }

        .step div {
            display: inline-block;
        }

        .step > div {
            margin-left: -0.12rem;
        }

        .step .baidian {
            width: 0.12rem;
            height: 0.12rem;
            background: #ffffff;
            border-radius: 0.1rem;
            vertical-align: middle;
        }

        .step .line1 {
            width: 3rem;
            height: 0.1rem;
            background-image: linear-gradient(to right, #3498db, #34badb);

        }

        .step .line2 {
            width: 3rem;
            height: 0.1rem;
            background-image: linear-gradient(to right, #34badb, #34dbd5);
        }

        .step .line3 {
            width: 1.9rem;
            height: 0.1rem;
            background-image: linear-gradient(to right, #34dbd5, #29db9a);
        }

        .dian1 {
            width: 0.24rem;
            height: 0.24rem;
            background: #3498db;
            border-radius: 0.24rem;
            float: left;
            margin: 0.02rem -0.06rem 0 0;
        }

        .dian2 {
            width: 0.24rem;
            height: 0.24rem;
            background: #34badb;
            border-radius: 0.24rem;
            float: left;
            margin: 0.02rem -0.06rem 0 0;
        }

        .dian3 {
            width: 0.24rem;
            height: 0.24rem;
            background: #34dbd5;
            border-radius: 0.24rem;
            float: left;
            margin: 0.02rem -0.06rem 0 0;
        }

        .dian4 {
            width: 0.24rem;
            height: 0.24rem;
            background: #29db9a;
            border-radius: 0.24rem;
            float: left;
            margin: 0.02rem -0.06rem 0 0;
        }

        .step_txt {
            text-align: center;
            margin-bottom: 0.2rem;
            display: flex;
        }

        .step_txt div {
            display: inline-block;
            font-size: 0.28rem;
            line-height: 0.3rem;
        }

        .txt1 {
            margin-left: 0.2rem;
        }

        .txt2 {
            margin-left: 2rem;
        }

        .txt3 {
            margin-left: 2rem;
        }

        .txt4 {
            margin-left: 0.8rem;
        }

        .top_progress {
            margin-top: 1rem;
            padding: 0.6rem 0;
            border-bottom: 1px solid #ccc;
            box-shadow: 0 1px 3px #ccc;
        }


        .personal_title {
            position: fixed;
            top: 0;
            color: #fff;
            background: linear-gradient(to right, #48aefd, #1095fc);
            height: 1rem;
            width: 100%;
            line-height: 1rem;
            font-size: 0.32rem;
            z-index: 1000;
            text-align: center;
        }

        .content {
            padding: 0.2rem;
        }
        .bs_title {
            font-size: 0.42rem;
            line-height: 0.6rem;
            font-weight: bold;
            color: #666;
            margin: 0.4rem 0;
        }
        .bs_title a {
            color: #139afc;
            font-size: 0.28rem;
            font-weight: normal;
            float: right;
        }


        .lab {
            font-size: 0.28rem;
            color: #666;
            line-height: 0.5rem;
        }
        input[type=text] {
            width: 7.1rem;
            height: 0.8rem;
            margin: 0 auto 0.4rem;
        }

        textarea {
            width: 6.3rem;
            height: 2.6rem;
            margin: 0 auto 0.4rem;
            font-size: 0.28rem;
            border: unset;
            color: #333;
            background: #f4f4f4;
            padding: 0.2rem 0.4rem;
        }

        #my_button {
            width: 3.8rem;
            height: 0.8rem;
            border-radius: 0.1rem;
            font-size: 0.3rem;
            line-height: 0.8rem;
            text-align: center;
            /*color: #fff;*/
            /*background: linear-gradient(to left,#1095fc ,#48aefd);*/
            background: #e6e6e6;
            color: #999;
            margin: 0.4rem auto 0;
        }
    </style>
</head>
<body>
<div class="app">
    <!--顶部返回栏-->
    <div class="personal_title">
        <span style="position: absolute;left: 0.2rem;line-height: 1rem;font-size: 0.4rem;"
              class="el-icon-arrow-left"></span>
        <span>网格管理</span>
    </div>

    <div class="top_progress">
        <div class="step_txt">
            <div>
                <div class="txt1" style="color: #3498db;">
                    等待接单
                </div>
            </div>
            <div>
                <div class="txt2" style="color: #34badb;">
                    已接单
                </div>
            </div>
            <div>
                <div class="txt3" style="color: #34dbd5;">
                    办事完结
                </div>
            </div>
        </div>
        <!-- data-i 123  表示进度，文字内容在step_txt中-->
        <div class="step" style="text-align: center" data-i="1">
            <div style="margin-left: 0.5rem;">
                <div class="line1"></div>
                <div class="dian1">
                    <div class="baidian"></div>
                </div>
            </div>
            <div>
                <div class="line2"></div>
                <div class="dian2">
                    <div class="baidian"></div>
                </div>
            </div>
            <div>
                <div style="width: 0;"></div>
                <div class="dian4">
                    <div class="baidian"></div>
                </div>
            </div>
        </div>
    </div>


    <!--内容-->
    <div class="content">
        <div class="bs_title">创建办事项</div>

        <div class="lab">办事项目</div>
        <input name="bsxm" type="text" value="社保政策" readonly>

        <div class="lab">事项详情</div>
        <textarea name="sxxq" readonly>周星驰弄阿森纳废弃物人去看你啊虽然你企鹅既往不咎还得把USB的</textarea>

        <div class="lab">姓名</div>
        <input name="xm" type="text" value="墨菊某某" readonly>

        <div class="lab">联系方式</div>
        <input name="lxfs" type="text" value="123456789" readonly>

        <div class="lab">联系地址</div>
        <input name="lxdz" type="text" value="123456789" readonly>

        <div id="my_button">等待网络员接单</div>
    </div>

</div>

<!-- JS -->
<script src="js/jquery-3.4.0/jquery-3.4.0.min.js"></script>
<script src="js/public.js"></script>
<script type="text/javascript">
    //初始化办事项目的值 url 中的 key=''
    let r = window.location.search.substr(1).match(new RegExp("(^|&)" + 'key' + "=([^&]*)(&|$)"));
    if (r !== null){
        console.log(decodeURI(r[2]) )
        $(".step")[0].dataset["i"] = decodeURI(r[2]) ;
    }

    //初始化
    let i = $(".step").get(0).dataset['i'];
    switch (i) {
        case "1":
            $(".dian2").get(0).style.background = "#bdbdbd";
            $(".dian4").get(0).style.background = "#bdbdbd";

            $(".txt2").get(0).style.color = "#bdbdbd";
            $(".txt3").get(0).style.color = "#dddddd";

            $(".line1").get(0).style.background = "linear-gradient(to right, rgb(52, 152, 219),#bdbdbd)";
            $(".line2").get(0).style.background = "linear-gradient(to right, #bdbdbd,#dddddd)";

            $("#my_button").text("等待网络员接单");
            break;
        case "2":
            $(".dian4").get(0).style.background = "#eee";

            $(".txt3").get(0).style.color = "#dddddd";

            $(".line2").get(0).style.background = "linear-gradient(to right, #34badb,#dddddd)";

            $("#my_button").text("正在接单处理中");
            break;
        case "3":
            $("#my_button").text("已确认完结");
            break;
    }


</script>
</body>

</html>
